1. Field of the Invention
The present invention relates to a method and an apparatus for detecting the vertical direction of a document, specifically, relates to an improvement of a technique for discriminating the top and the bottom of an image read out from an original document in a copying machine, a facsimile, an optical filing system, and the like.
2. Description of the Related Art
In the copying machine or the facsimile, the image is outputted in the same direction as of the image read out. The machine is frequently operated such that a number of documents, viz., the images thereon, are successively read out, processed, and outputted. In this case, if a document or documents of which the top and the bottom are reverse to those of the remaining documents are included in those documents, the documents of which the top and the bottom are reverse are outputted while keeping their vertical direction.
In using the copied documents, it is desirable or necessary to arrange the copied documents in the top and the bottom thereof for ease of subsequent handling of them.
In the facsimile or the optical filing system, the input image is transmitted to another station or stored in a memory device, while not printed out. In this type of the machine, it is necessary to arrange the documents in the top and the bottom thereof before the document images are read out. In the copying machine with a stapling function, the printed out documents are arranged and stapled together at a preset position or positions. Accordingly, also in this machine, the documents must be arranged in the top and the bottom thereof before the image reading operation.
A large document, such as a large book, is set on the machine while being spread. In this state, the pages of the book spread are alternately read, so the top and the bottom of the first copied page are inverted with respect to those of the second copied page.
It is desirable that before processing a set of documents, a machine checks the vertical directions of the images on the documents, and if a document bearing an image whose vertical direction is inverted is included in those documents, the machine automatically turns (by 180.degree.) the inverted document and sets it in a correct vertical direction. By so doing, the machine is operated without taking any care on the vertical directions of the documents, and the printed out documents are all arranged in the same vertical direction.
The apparatus for detecting the vertical direction of an image on a document to be processed are disclosed in Unexamined Japanese Patent Publication (kokai) Nos. Hei. 5-110814 and 5-274334.
The apparatus disclosed in the publications is based on the optical character recognition (OCR) technique, and the former is applied to the copying machine. A specific number of characters are picked up from an input image, and recognized character by character to detect the vertical direction of the characters. If the vertical direction of the character is different from a preset one, the image data is turned by a preset angle.
The apparatus of the latter publication is applied to the optical filing system. The apparatus recognizes characters on a document on the assumption that the characters are vertically oriented in a preset direction. If recognizing at least a preset number of characters, the apparatus judges that the document is oriented in the preset direction. Then, the apparatus stored the readout data into an optical disc. When the number of the recognized characters is smaller than the preset number, the apparatus judges that the document is inverted, and inverts the readout image and then stores the inverted one into the optical disc.
In those vertical direction detecting apparatuses, the characters contained in the image on the document are recognized, so that much time is taken for the judging the vertical direction of the image on the document. The system for recognizing the characters is large in scale. For this reason, the copying machine, for example, is not provided with the character recognition system. If one attempts to incorporate the vertical direction detecting function into the copying machine, the character recognition system must be coupled with the machine. As a result, the copying machine is increased in size and cost.